#include "mssans9.h"
#include <nds.h>

using namespace WoopsiUI;

static const u16 MSSans9_glyphdata[300] = {
/* '!' */	0xFA00,
/* '"' */	0xB400,0x0000,0x0000,
/* '#' */	0x55F9,0xFAA0,0x0000,
/* '$' */	0x27AA,0x655E,0x4000,
/* '%' */	0x46A5,0x0829,0x5880,0x0000,0x0000,
/* '&' */	0x4AA4,0xBA70,0x0000,
/* ''' */	0xC000,
/* '(' */	0x6AAA,0x4000,
/* ')' */	0x9555,0x8000,
/* '*' */	0xAA80,0x0000,0x0000,
/* '+' */	0x0109,0xF210,0x0000,0x0000,
/* ',' */	0x0006,0x0000,
/* '-' */	0x000E,0x0000,0x0000,
/* '.' */	0x0200,
/* '/' */	0x2525,0x2000,0x0000,
/* '0' */	0x6999,0x9960,0x0000,
/* '1' */	0x7554,0x0000,
/* '2' */	0x6912,0x48F0,0x0000,
/* '3' */	0x6912,0x1960,0x0000,
/* '4' */	0x1195,0x2F88,0x4000,0x0000,
/* '5' */	0xF8E1,0x1960,0x0000,
/* '6' */	0x698E,0x9960,0x0000,
/* '7' */	0xF122,0x2440,0x0000,
/* '8' */	0x6996,0x9960,0x0000,
/* '9' */	0x6997,0x1960,0x0000,
/* ':' */	0x2200,
/* ';' */	0x0406,0x0000,
/* '<' */	0x0168,0x6100,0x0000,
/* '=' */	0x00F0,0xF000,0x0000,
/* '>' */	0x0861,0x6800,0x0000,
/* '?' */	0x6912,0x2020,0x0000,
/* '@' */	0x3C42,0x9DA5,0xA59E,0x403E,0x0000,0x0000,
/* 'A' */	0x1050,0xA227,0xD060,0x8000,0x0000,0x0000,
/* 'B' */	0xE99E,0x99E0,0x0000,
/* 'C' */	0x7461,0x0845,0xC000,0x0000,
/* 'D' */	0xE4A3,0x18CB,0x8000,0x0000,
/* 'E' */	0xF88F,0x88F0,0x0000,
/* 'F' */	0xF88F,0x8880,0x0000,
/* 'G' */	0x7461,0x38C5,0xE000,0x0000,
/* 'H' */	0x8C63,0xF8C6,0x2000,0x0000,
/* 'I' */	0xFE00,
/* 'J' */	0x1111,0x1960,0x0000,
/* 'K' */	0x8CA9,0x8A4A,0x2000,0x0000,
/* 'L' */	0x8888,0x88F0,0x0000,
/* 'M' */	0x8307,0x1D5A,0xB260,0x8000,0x0000,0x0000,
/* 'N' */	0x8E73,0x59CE,0x2000,0x0000,
/* 'O' */	0x7463,0x18C5,0xC000,0x0000,
/* 'P' */	0xF463,0xE842,0x0000,0x0000,
/* 'Q' */	0x7463,0x18CD,0xC100,0x0000,
/* 'R' */	0xF463,0xE946,0x2000,0x0000,
/* 'S' */	0x6986,0x1960,0x0000,
/* 'T' */	0xF908,0x4210,0x8000,0x0000,
/* 'U' */	0x8C63,0x18C5,0xC000,0x0000,
/* 'V' */	0x8305,0x1222,0x8504,0x0000,0x0000,0x0000,
/* 'W' */	0x88C4,0x554A,0xA221,0x1088,0x0000,0x0000,0x0000,
/* 'X' */	0x8523,0x0C31,0x2840,0x0000,0x0000,
/* 'Y' */	0x8C54,0x4210,0x8000,0x0000,
/* 'Z' */	0xF124,0x48F0,0x0000,
/* '[' */	0xEAAA,0xC000,
/* '\' */	0x9124,0x4800,0x0000,
/* ']' */	0xD555,0xC000,
/* '^' */	0x22A2,0x0000,0x0000,0x0000,
/* '_' */	0x0000,0x0000,0x00F8,0x0000,
/* '`' */	0x9000,0x0000,
/* 'a' */	0x00E1,0x7970,0x0000,
/* 'b' */	0x88E9,0x99E0,0x0000,
/* 'c' */	0x0069,0x8960,0x0000,
/* 'd' */	0x1179,0x9970,0x0000,
/* 'e' */	0x0069,0xF870,0x0000,
/* 'f' */	0x6EA8,0x0000,
/* 'g' */	0x0079,0x9971,0xE000,
/* 'h' */	0x88E9,0x9990,0x0000,
/* 'i' */	0xBE00,
/* 'j' */	0xBF00,
/* 'k' */	0x889A,0xCA90,0x0000,
/* 'l' */	0xFE00,
/* 'm' */	0x0003,0xF499,0x3264,0x8000,0x0000,0x0000,
/* 'n' */	0x00E9,0x9990,0x0000,
/* 'o' */	0x0069,0x9960,0x0000,
/* 'p' */	0x00E9,0x99E8,0x8000,
/* 'q' */	0x0079,0x9971,0x1000,
/* 'r' */	0x0EA8,0x0000,
/* 's' */	0x0078,0x61E0,0x0000,
/* 't' */	0x2EAC,0x0000,
/* 'u' */	0x0099,0x9970,0x0000,
/* 'v' */	0x0023,0x1528,0x8000,0x0000,
/* 'w' */	0x0002,0x4C9A,0xA891,0x0000,0x0000,0x0000,
/* 'x' */	0x0099,0x6990,0x0000,
/* 'y' */	0x0099,0x9644,0x8000,
/* 'z' */	0x00F1,0x68F0,0x0000,
/* '{' */	0x2928,0x9220,0x0000,
/* '|' */	0xFF00,
/* '}' */	0x8922,0x9280,0x0000,
/* '~' */	0x5A00,0x0000,0x0000,
/* 0x7F */	0x0F99,0x99F0,0x0000,
};

static const u16 MSSans9_offset[95] = {
    0,    1,    4,    7,   10,   15,   18,   19,   21,   23,   26,   30,   32,   35,   36,   39,
   42,   44,   47,   50,   54,   57,   60,   63,   66,   69,   70,   72,   75,   78,   81,   84,
   90,   96,   99,  103,  107,  110,  113,  117,  121,  122,  125,  129,  132,  138,  142,  146,
  150,  154,  158,  161,  165,  169,  175,  182,  187,  191,  194,  196,  199,  201,  205,  209,
  211,  214,  217,  220,  223,  226,  228,  231,  234,  235,  236,  239,  240,  246,  249,  252,
  255,  258,  260,  263,  265,  268,  272,  278,  281,  284,  287,  290,  291,  294,  297
};

static const u8 MSSans9_width[95] = {
 1, 3, 4, 4, 6, 4, 1, 2, 2, 3, 5, 2, 3, 1, 3, 4,
 2, 4, 4, 5, 4, 4, 4, 4, 4, 1, 2, 4, 4, 4, 4, 8,
 7, 4, 5, 5, 4, 4, 5, 5, 1, 4, 5, 4, 7, 5, 5, 5,
 5, 5, 4, 5, 5, 7, 9, 6, 5, 4, 2, 3, 2, 5, 5, 2,
 4, 4, 4, 4, 4, 2, 4, 4, 1, 1, 4, 1, 7, 4, 4, 4,
 4, 2, 4, 2, 4, 5, 7, 4, 4, 4, 3, 1, 3, 4, 4
};

MSSans9::MSSans9(u8 fixedWidth) : PackedFont1 (
	33,
	127,
	MSSans9_glyphdata,
	MSSans9_offset,
	MSSans9_width,
	12,
	3,
	6,
	9
) {
	if (fixedWidth) setFontWidth(fixedWidth);
};
